<?php
listname();
function listname(){
	global $db,$template,$cid;
	$sql="select m.*,c.*  from vb_companyprofile c inner join vb_memberprofile m on c.memID=m.memID where c.memID=".$cid." " ;
	//echo $sql;
	if(!$result=$db->sql_query($sql)){
	  message_die("Couldn't run the sql query!!!1","",__LINE__,__FILE__,$sql);
	}
	$prod_count=$db->sql_numrows($result);
	$prod_data=$db->sql_fetchrowset($result);

	 for($i=0;$i<$prod_count;$i++){
		$template->assign_block_vars("promenuRow", array(	
		'com_photo' =>!empty( $prod_data[$i]["barner"]) ? "<img src=\"barner/". $prod_data[$i]["barner"]."\" align=\"absmiddle\">" : '' , 	
		'proCatName' =>	$prod_data[$i]["CompanyName"],
		));
	}
			$template->assign_vars(array(	
			));
	$template->set_filenames(array(
		"lefmenu"	=> "template/name.tpl"
	));
	$template->pparse('lefmenu');
	unset($prod_data);
	$template->destroy();	
}

?>